
export interface ResponseData {
  code: number;
  message: string;
  ok: boolean;
  data?: any;
}

export interface HospitalDetail {
  bookingRule: {
    cycle: number,
    releaseTime: string,
    stopTime: string,
    quitDay: number,
    quitTime: string,
    rule: string[]
  },
  hospital: {
    id: string,
    createTime: string,
    updateTime: string,
    isDeleted: number,
    param: {
      hostypeString: string,
      fullAddress: string,
    },
    hoscode: string,
    hosname: string,
    hostype: string,
    provinceCode: string,
    cityCode: string,
    districtCode: string,
    address: string,
    logoData: string,
    intro: string,
    route: string,
    status: number,
  }
}

export interface HospitalDetailResponseData extends ResponseData {
  data: HospitalDetail
}

/**
 * 医院科室数据类型
 */
export interface HospitalDepartment {
  depcode: string;
  depname: string;
  children?: HospitalDepartment[]
}

/**
 * 科室列表接口返回数据类型
 */
export interface HospitalDepartmentResponseData extends ResponseData {
  data: HospitalDepartment[]
}

/**
 *  登陆接口需要的参数类型
 */
export interface LoginData {
  phone: string,
  code: string,
}

export interface UserInfo {
  name: string,
  token: string,
}


export interface UserInfoResponseData extends ResponseData {
  data: UserInfo
}

export interface WXLogin {
  redirectUri: string,
  appid: string,
  scope: string,
  state: string,
}

export interface WXLoginResponseData extends ResponseData {
  data: WXLogin
}

export interface BaseMap {
  workDateString: string,
  releaseTime: string,
  bigname: string,
  stopTime: string,
  depname: string,
  hosname: string,
}

export interface WorkData {
  workDate: string,
  workDateMd: string,
  dayOfWeek: string,
  docCount: number,
  reservedNumber: number,
  availableNumber: number,
  status: number,
}

export interface HospitalWork {
  total: number,
  bookingScheduleList: WorkData[],
  baseMap: BaseMap
}

export interface HospitalWorkResponseData extends ResponseData {
  data: HospitalWork
}

export interface Doctor{
  "id": string,
  "createTime": string,
  "updateTime": string,
  "isDeleted": number,
  "param": {
    "dayOfWeek": string,
    "depname": string,
    "hosname": string
  },
  "hoscode": string,
  "depcode": string,
  "title": string,
  "docname": string,
  "skill": string,
  "workDate": string,
  "workTime": number,
  "reservedNumber": number,
  "availableNumber": number,
  "amount": number,
  "status": number,
  "hosScheduleId": string
}

export interface HospitalDoctorResponseData extends ResponseData {
  data: Doctor[]
}

/**
 * 就诊人信息
 */
export interface UserData{
  id: string,
  createTime: string,
  updateTime: string,
  isDeleted: number,
  param:{
    certificatesTypeString: string,
    contactsCertificatesTypeString: string,
    cityString: string,
    fullAddress: string,
    districtString: string,
    provinceString: string,
  },
  userId:number,
  name: string,
  certificatesType: string,
  certificatesNo: string,
  sex: number,
  birthdate: string,
  phone: string,
  isMarry: number,
  provinceCode: string,
  cityCode: string,
  districtCode: string,
  address: string,
  contactsName: string,
  contactsCertificatesType: string,
  contactsCertificatesNo: string,
  contactsPhone: string,
  isInsure: number,
  cardNo: string,
  status: string,
}

export interface UserResponseData extends ResponseData {
  data: UserData[]
}

export interface AddOrUpdateUser{
  id?: string,
  name: string,
  certificatesType: string,
  certificatesNo: string,
  sex: number,
  birthdate: string,
  phone: string,
  isMarry: number,
  isInsure: number,
  addressSelected:string[],
  address: string,
  contactsName: string,
  contactsCertificatesType: string,
  contactsCertificatesNo: string,
  contactsPhone: string,
}

export interface DoctorResponseData extends ResponseData{
  data: Doctor
}
